import java.util.Scanner;

public class DateDemo02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入年份");
        int y = scanner.nextInt();
        System.out.println("请输入月");//5
        int m = scanner.nextInt();
        System.out.println("请输入日");
        int d = scanner.nextInt();
        int allDay = 0;
//        for (int i = 1; i < m  ; i++) {
//            if (i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12){
//                allDay+=31;
//            }else if(i == 2){
//                if((y %4 == 0 && y % 100 !=0) || y % 400 == 0){
//                    allDay+=29;
//                }else{
//                    allDay+=28;
//                }
//
//            }else{
//                allDay+=30;
//            }
//        }
//        allDay+=d;
//
//        System.out.println(y+"年"+m+"月"+d+"日是今年的"+allDay+"天");

        for (int i = 1; i < m; i++) {
            switch (i) {
                case 4:
                case 6:
                case 9:
                case 11:
                    allDay += 30;
                    break;
                case 2:
                    if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0) {
                        allDay += 29;
                    } else {
                        allDay += 28;
                    }
                    break;
                default:
                    allDay += 31;

            }
        }
        allDay += d;
        System.out.println(y + "年" + m + "月" + d + "日是今年的" + allDay + "天");
    }
}
